 #ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtSql>
#include <QPrinter>
namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
private:
    Ui::MainWindow *ui;
    void showError(const QSqlError &err);
    QSqlRelationalTableModel *model;
    void rightGroupBox();
    bool copyFileToPath(QString sourceDir ,QString toDir, bool coverFileIfExist);
    bool isUpdate;
    int isAscendingOrder;
    QList< QList<QVariant> > m_datas;
public slots:
    void newPushAction();
    void leadIntoAction();
    void prePushAction();
    void nextPushAction();
    void addPushAction();
    void cancelSaveAction();
    void saveAction();
    void loadTableDataSource();
    void currentModelIndex(const QModelIndex &index);
    void setPackage(QString data);   //接收传递过来的数据的槽
    void delPushAction();
    void quitPushAction();
    void firstNameEditFinish();
    void lastNameEditFinish();
    void categoryProcess(int index);
    void photoNameEditFinish();
    void comboBoxProcess(QString str);
    void onRadioClick();
    void stayDayEditFinish();
    void editPushAction();
    void sortPushAction();
    void insertData(QStringList dataList);
    void printer1Action();
    void printer2Action();
    void printer3Action();
    void createApply();
};

#endif // MAINWINDOW_H
